Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ICD] Add subscriber request max interval getter (#36021) #36176

Conversation

mkardous-silabs
Copy link
Contributor

Description

This PR is a cherry-pick of #36021.

When #28375 was merged to add a default subscription behavior to the subscription establishment, the MaxInterval of the readhandler is changed to the default ICD behavior with the expectation that this behavior can be changed with the OnSubscriptionEstablished callback.

The issue is that since we overrule the request MaxInterval, the application API doesn't have a way of knowing the requested max interval from the subscriber to do its decision making. This also impacted the SetMaxInterval function where we were changing the allow maximum which could decrease the spec allowed max interval selection.

PR adds a member that stores the subscriber max interval that can be accessed by the application without impacting the SetMaxInterval function

Fixes #35991

Tests
Added a unit test to validate the SetMaxInterval readhandler function

* Add subscriber request max interval getter

* Add unit-test for the SetMaxReportingInterval

* Restyled by clang-format

* fix conversation error

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
Copy link

Review changes with SemanticDiff.

Copy link

github-actions bot commented Oct 21, 2024

PR #36176: Size comparison from 803e819 to 22dceb2

Increases above 0.2%:

platform target config section 803e819 22dceb2 change % change
nxp contact k32w1+release RAM 63008 63168 160 0.3
mcxw71+release RAM 63008 63168 160 0.3
light k32w1+release RAM 48648 48808 160 0.3
mcxw71+release RAM 48648 48808 160 0.3
psoc6 light cy8ckit_062s2_43012 RAM 200688 201200 512 0.3
telink air-quality-sensor-app tlsr9528a_retention RAM 50488 50648 160 0.3
contact-sensor-app tlsr9528a_retention RAM 50440 50600 160 0.3
light-switch-app-ota-shell-factory-data tlsr9528a RAM 73780 73940 160 0.2
lock-app-dfu tlsr9528a RAM 66500 66660 160 0.2
pump-app-usb tlsr9518adk80d RAM 55316 55476 160 0.3
pump-controller-app tlsr9518adk80d RAM 52560 52720 160 0.3
smoke_co_alarm-app tlsr9528a_retention RAM 52160 52320 160 0.3
temperature-measurement-app-mars-ota tlsr9518adk80d RAM 56108 56268 160 0.3
thermostat tlsr9518adk80d RAM 52952 53112 160 0.3
Full report (88 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 803e819 22dceb2 change % change
bl602 lighting-app bl602 FLASH 1280534 1280574 40 0.0
RAM 95808 96000 192 0.2
bl602+mfd FLASH 1308582 1308622 40 0.0
RAM 95464 95656 192 0.2
bl602+rpc FLASH 1335202 1335242 40 0.0
RAM 103784 103976 192 0.2
bl702 lighting-app bl702 FLASH 944934 944974 40 0.0
RAM 15105 15105 0 0.0
bl702+mfd FLASH 957388 957428 40 0.0
RAM 14769 14769 0 0.0
bl702+rpc FLASH 1051092 1051132 40 0.0
RAM 23661 23661 0 0.0
bl706-eth FLASH 658066 658106 40 0.0
RAM 24745 24745 0 0.0
bl706-wifi FLASH 824862 824902 40 0.0
RAM 13965 13965 0 0.0
bl702l lighting-app bl702l FLASH 961870 961910 40 0.0
RAM 16804 16804 0 0.0
bl702l+mfd FLASH 974632 974672 40 0.0
RAM 16468 16468 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 829284 829316 32 0.0
RAM 123292 123452 160 0.1
lock-ftd LP_EM_CC1354P10_6 FLASH 814608 814648 40 0.0
RAM 125172 125332 160 0.1
pump-app LP_EM_CC1354P10_6 FLASH 761156 761196 40 0.0
RAM 113664 113824 160 0.1
pump-controller-app LP_EM_CC1354P10_6 FLASH 745392 745432 40 0.0
RAM 113856 114016 160 0.1
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 616882 616922 40 0.0
RAM 205396 205908 512 0.2
lock CC3235SF_LAUNCHXL FLASH 656970 657010 40 0.0
RAM 205548 206060 512 0.2
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 678237 678277 40 0.0
RAM 78508 78668 160 0.2
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 698089 698129 40 0.0
RAM 81140 81300 160 0.2
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 698089 698129 40 0.0
RAM 81140 81300 160 0.2
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 655025 655065 40 0.0
RAM 73576 73736 160 0.2
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614581 614621 40 0.0
RAM 71468 71628 160 0.2
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634209 634249 40 0.0
RAM 74020 74180 160 0.2
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634209 634249 40 0.0
RAM 74020 74180 160 0.2
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 633893 633933 40 0.0
RAM 74516 74676 160 0.2
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 653609 653649 40 0.0
RAM 77068 77228 160 0.2
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 653609 653649 40 0.0
RAM 77068 77228 160 0.2
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609197 609237 40 0.0
RAM 68604 68764 160 0.2
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629057 629097 40 0.0
RAM 71236 71396 160 0.2
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629057 629097 40 0.0
RAM 71236 71396 160 0.2
efr32 lighting-app BRD4187C FLASH 933672 933696 24 0.0
RAM 135876 136036 160 0.1
lock-app BRD2605a FLASH 740176 740216 40 0.0
RAM 230240 230400 160 0.1
BRD4338a FLASH 740824 740864 40 0.0
RAM 230272 230432 160 0.1
window-app BRD4187C FLASH 1017076 1017132 56 0.0
RAM 127804 127964 160 0.1
esp32 all-clusters-app c3devkit DRAM 94080 94240 160 0.2
FLASH 1538374 1538428 54 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115032 115192 160 0.1
FLASH 1548838 1548854 16 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2778737 2778809 72 0.0
RAM 129488 129488 0 0.0
all-clusters-app debug unknown 5528 5528 0 0.0
FLASH 6082682 6082754 72 0.0
RAM 510528 510528 0 0.0
all-clusters-minimal-app debug unknown 5424 5424 0 0.0
FLASH 5415966 5416038 72 0.0
RAM 241200 241200 0 0.0
bridge-app debug unknown 5408 5408 0 0.0
FLASH 4749386 4749458 72 0.0
RAM 218384 218384 0 0.0
chip-tool debug unknown 5960 5960 0 0.0
FLASH 12654204 12654276 72 0.0
RAM 560626 560626 0 0.0
chip-tool-ipv6only arm64 unknown 20672 20672 0 0.0
FLASH 11292608 11292624 16 0.0
RAM 610944 610944 0 0.0
fabric-admin debug unknown 5792 5792 0 0.0
FLASH 11006857 11006929 72 0.0
RAM 560058 560058 0 0.0
fabric-bridge-app debug unknown 4632 4632 0 0.0
FLASH 4572352 4572424 72 0.0
RAM 205048 205048 0 0.0
lighting-app debug+rpc+ui unknown 6056 6056 0 0.0
FLASH 5689201 5689265 64 0.0
RAM 228456 228456 0 0.0
lock-app debug unknown 5344 5344 0 0.0
FLASH 4798982 4799054 72 0.0
RAM 204472 204472 0 0.0
ota-provider-app debug unknown 4720 4720 0 0.0
FLASH 4428370 4428442 72 0.0
RAM 198192 198192 0 0.0
ota-requestor-app debug unknown 4656 4656 0 0.0
FLASH 4567186 4567258 72 0.0
RAM 202760 202760 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3108765 3108845 80 0.0
RAM 159280 159280 0 0.0
thermostat-no-ble arm64 unknown 9448 9448 0 0.0
FLASH 4317120 4317136 16 0.0
RAM 242888 242888 0 0.0
tv-app debug unknown 5624 5624 0 0.0
FLASH 6026821 6026885 64 0.0
RAM 584064 584064 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10848269 10848349 80 0.0
RAM 648912 648912 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 914168 914212 44 0.0
RAM 142199 142359 160 0.1
nrf7002dk_nrf5340_cpuapp FLASH 884952 885000 48 0.0
RAM 140338 140498 160 0.1
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 847588 847628 40 0.0
RAM 141093 141253 160 0.1
nxp contact k32w0+release FLASH 581928 581976 48 0.0
RAM 70784 70944 160 0.2
k32w1+release FLASH 596632 596672 40 0.0
RAM 63008 63168 160 0.3
mcxw71+release FLASH 596392 596432 40 0.0
RAM 63008 63168 160 0.3
light k32w0+release FLASH 618516 618564 48 0.0
RAM 70256 70416 160 0.2
k32w1+release FLASH 682632 682664 32 0.0
RAM 48648 48808 160 0.3
mcxw71+release FLASH 682632 682664 32 0.0
RAM 48648 48808 160 0.3
lock k32w1+release FLASH 704984 705032 48 0.0
RAM 67148 67308 160 0.2
mcxw71+release FLASH 704992 705040 48 0.0
RAM 67148 67308 160 0.2
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646044 1646092 48 0.0
RAM 210888 211400 512 0.2
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552100 1552148 48 0.0
RAM 207688 208200 512 0.2
light cy8ckit_062s2_43012 FLASH 1467572 1467620 48 0.0
RAM 200688 201200 512 0.3
lock cy8ckit_062s2_43012 FLASH 1464644 1464692 48 0.0
RAM 225048 225560 512 0.2
qpg lighting-app qpg6105+debug FLASH 660272 660312 40 0.0
RAM 105236 105396 160 0.2
lock-app qpg6105+debug FLASH 618284 618324 40 0.0
RAM 99704 99864 160 0.2
stm32 light STM32WB5MM-DK FLASH 481568 481608 40 0.0
RAM 144684 144844 160 0.1
telink air-quality-sensor-app tlsr9528a_retention FLASH 620672 620712 40 0.0
RAM 50488 50648 160 0.3
all-clusters-app tlsr9118bdk40d FLASH 687868 687912 44 0.0
RAM 148328 148488 160 0.1
all-clusters-minimal-app tlsr9528a FLASH 780860 780904 44 0.0
RAM 110280 110440 160 0.1
bridge-app tlsr9258a FLASH 680770 680814 44 0.0
RAM 91144 91304 160 0.2
contact-sensor-app tlsr9528a_retention FLASH 620436 620476 40 0.0
RAM 50440 50600 160 0.3
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 708376 708416 40 0.0
RAM 73780 73940 160 0.2
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625374 625418 44 0.0
RAM 144308 144468 160 0.1
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811134 811178 44 0.0
RAM 98940 99100 160 0.2
lock-app-dfu tlsr9528a FLASH 656342 656382 40 0.0
RAM 66500 66660 160 0.2
ota-requestor-app tlsr9258a FLASH 696746 696790 44 0.0
RAM 90736 90896 160 0.2
pump-app-usb tlsr9518adk80d FLASH 634068 634108 40 0.0
RAM 55316 55476 160 0.3
pump-controller-app tlsr9518adk80d FLASH 611258 611298 40 0.0
RAM 52560 52720 160 0.3
shell tlsr9518adk80d FLASH 467862 467862 0 0.0
RAM 68168 68168 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 627586 627626 40 0.0
RAM 52160 52320 160 0.3
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 653394 653434 40 0.0
RAM 56108 56268 160 0.3
thermostat tlsr9518adk80d FLASH 637990 638030 40 0.0
RAM 52952 53112 160 0.3
window-covering tlsr9118bdk40d FLASH 524132 524172 40 0.0
RAM 97284 97444 160 0.2
tizen all-clusters-app arm unknown 4904 4904 0 0.0
FLASH 1725728 1725768 40 0.0
RAM 89076 89076 0 0.0
chip-tool-ubsan arm unknown 10424 10424 0 0.0
FLASH 17523466 17523714 248 0.0
RAM 7627668 7627764 96 0.0

@andy31415 andy31415 merged commit 8304c7a into project-chip:v1.4-branch Oct 21, 2024
69 of 70 checks passed
@mkardous-silabs mkardous-silabs deleted the cherry-pick/readhandler_fix branch October 23, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants